# 保存当前工作目录
$originalLocation = Get-Location

# 设置工作目录为脚本所在目录
Set-Location $PSScriptRoot


try {
    & go run ./.tools/ .
}
catch {
    exit 1
}
finally {
    # 恢复原始工作目录
    Set-Location $originalLocation
}